package com.iwhalecloud.bss.kite.cucc.manager.scene.service.operate;

import com.iwhalecloud.bss.kite.cucc.manager.api.ILocalOperateSceneInstService;
import com.iwhalecloud.bss.kite.manager.enums.ActionType;
import com.iwhalecloud.bss.kite.manager.enums.InstType;
import com.iwhalecloud.bss.kite.manager.enums.RelType;
import com.iwhalecloud.bss.kite.manager.inst.KiteOfferInstAcct;
import com.iwhalecloud.bss.kite.manager.inst.KiteOfferInstContract;
import com.iwhalecloud.bss.kite.manager.scene.service.operate.OperateMainOfferInstService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class LocalOperateSceneInstService implements ILocalOperateSceneInstService {

	@Resource(name = "manager.localOperOfferInstAcctRelService")
    private LocalOperateOfferInstAcctRelService operateOfferInstAcctRelService;

	@Resource(name = "manager.localOperOfferInstContractRelService")
	private LocalOperateOfferInstContractRelService operateOfferInstContractRelService;

    @Resource(name = "manager.operateMemOfferInstService")
    private LocalOperateMemOfferInstService localOperateMemOfferInstService;

	@Override
	public String addOfferInstAcctRel(String sceneInstId, KiteOfferInstAcct offerInstAcctRel, String offerInstId, InstType instType,
			RelType relType, ActionType relActionType) {
		return operateOfferInstAcctRelService.addOfferInstAcctRel(sceneInstId, offerInstAcctRel, offerInstId, instType, relType, relActionType);
	}

	@Override
	public Boolean deleteOfferInstAcctRel(String sceneInstId, String offerInstId, InstType offerInstType, String offerInstAcctRelId) {
		return operateOfferInstAcctRelService.deleteOfferInstAcctRel(sceneInstId, offerInstId, offerInstAcctRelId, offerInstType);
	}

	@Override
	public String addOfferInstContractRel(String sceneInstId, KiteOfferInstContract offerInstContractRel,
			String offerInstId, InstType offerInstType, RelType relType, ActionType relActionType) {
		return operateOfferInstContractRelService.addOfferInstContractRel(sceneInstId, offerInstId, offerInstType, offerInstContractRel, relType, relActionType);
	}

	@Override
	public Boolean deleteOfferInstContractRel(String sceneInstId, String offerInstId, InstType offerInstType, String offerInstContractRelId) {
		return operateOfferInstContractRelService.deleteOfferInstContractRel(sceneInstId, offerInstId, offerInstType, offerInstContractRelId);
	}

    @Override
    public Boolean deleteMemOfferInst(String sceneInstId, String offerInstId) {
        return localOperateMemOfferInstService.deleteOfferInst(sceneInstId, offerInstId);
    }

}
